//
//  ZYXComeHeaderView.m
//  RuiBeiKang
//
//  Created by iOS开发1 on 2019/1/10.
//  Copyright © 2019年 JW. All rights reserved.
//

#import "ZYXComeHeaderView.h"

@implementation ZYXComeHeaderView
-(instancetype)initWithFram:(CGRect)fram TitleOne:(NSString *)oneStr  andTitleTwo:(NSString *)twoStr{
    if (self = [super init]) {
        self = [[NSBundle mainBundle] loadNibNamed:@"ZYXComeHeaderView" owner:nil options:nil].lastObject;
        self.frame = fram;
        self.oneBtn.selected = YES;
        [self.oneBtn setTitle:oneStr forState:UIControlStateNormal];
        [self.oneBtn setTitle:oneStr forState:UIControlStateSelected];
        [self.twoBtn setTitle:twoStr forState:UIControlStateNormal];
        [self.twoBtn setTitle:twoStr forState:UIControlStateSelected];
    }
    return self;
}
//-(void)awakeFromNib{
//    [super awakeFromNib];
//}
- (IBAction)ClickOneBtn:(UIButton *)sender {
    NSLog(@"111");
    [self.delegate clickBtnWith:@"one"];
    self.lineLead.constant = (HEIGHT(180)-70)*0.5;
    self.oneBtn.selected = YES;
    self.twoBtn.selected = NO;
    
}
- (IBAction)ClickTwoBtn:(UIButton *)sender {
     NSLog(@"222");
    [self.delegate clickBtnWith:@"two"];
      self.lineLead.constant =HEIGHT(180)+(HEIGHT(180)-70)*0.5;
    self.oneBtn.selected = NO;
    self.twoBtn.selected = YES;
}

@end
